<template>
  <div class="hook">
    <h2>当前求和为：{{ sum }}</h2>
    <button @click="increment">点我+1</button>
    <button @click="decrement">点我-1</button>
    <hr />
    <!-- 图片list -->
    <img
      v-for="(u, index) in dogList"
      :key="index"
      :src="u.toString()"
      class="imgBox"
    />
    <button @click="getDog">再来一只狗</button>
  </div>
</template>

<script lang="ts">
import { defineComponent } from "vue";
export default defineComponent({
  name: "App",
});
</script>

<script setup lang="ts">
import useSum from "./useSum";
import useDog from "./useDog";
let { sum, increment, decrement } = useSum();
let { dogList, getDog } = useDog();
console.log(dogList,'123')
</script>
<style scoped>
.hook {
  width: 80vw;
  height: 80vh;
  border: 1px solid red;
}
.imgBox {
  width: 30vw;
  height: 30vw;
}
</style>